Binding Enum[] to ListBox

Posted by Polaris on Stack Overflow See other posts from Stack Overflow or by Polaris
Published on 2010-05-20T06:05:59Z Indexed on 2010/05/20 6:10 UTC
Read the original article Hit count: 168

Filed under:
|
|

Hello. I have next enumeration

Enum rcCategory
{
  Incoming,
  Internal,
  Outgoing
}

and I have property "categories" in my class which has rcCategory[] type.

I would like to bind this property to the listBox. I use next code for this

MyListBox.SetBinding (ListBox.ItemsSource, new Binding {Source= myClass.categories});

But this code doesnt work as expected. How Can I do this. My listBox always is empty but source property has value

© Stack Overflow or respective owner

Related posts about wpf

Related posts about binding